package org.example.myprojectbackend.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @ClassName WebConfiguration
 * @Author liupanpan
 * @Date 2025/1/7
 * @Description web服务相关配置
 */
@Configuration
public class WebConfiguration {
    //给用户登录时输入的密码进行加密
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
